package com.fijo.cores.admin.syslog.model;

import java.util.Date;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fijo.cores.model.BaseObject;
import com.fijo.cores.model.BaseObject;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;

@Entity
@Table(name = "sys_logininfo")
@ApiModel
public class SysLoginInfo extends BaseObject<SysLoginInfo> {
	/**
	 * 
	 */
	private static final long serialVersionUID = -9051618621562557642L;

	/**
	 * This field was generated by MyBatis Generator. This field corresponds to
	 * the database column sys_logininfo.id
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	@Id
	@Column(name = "id")
    @SequenceGenerator(name="sys_logininfo_seq", sequenceName="sys_logininfo_seq")
    @GeneratedValue(strategy=GenerationType.AUTO, generator="sys_logininfo_seq")
    @ApiModelProperty(value="主键Id")
	private Long id;

	/**
	 * This field was generated by MyBatis Generator. This field corresponds to
	 * the database column sys_logininfo.loginIP
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	@Column(name = "loginIP")
    @ApiModelProperty(value="登陆IP")
	private String loginip;

	/**
	 * This field was generated by MyBatis Generator. This field corresponds to
	 * the database column sys_logininfo.loginTime
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	@Column(name = "loginTime")
    @ApiModelProperty(value="登陆时间")
	private Date logintime;

	/**
	 * This field was generated by MyBatis Generator. This field corresponds to
	 * the database column sys_logininfo.logoutTime
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	@Column(name = "logoutTime")
    @ApiModelProperty(value="登出时间")
	private Date logouttime;

	/**
	 * This field was generated by MyBatis Generator. This field corresponds to
	 * the database column sys_logininfo.sessionId
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	@Column(name = "sessionId", nullable = false, length = 100)
    @ApiModelProperty(value="回话Id")
	private String sessionid;

	/**
	 * This field was generated by MyBatis Generator. This field corresponds to
	 * the database column sys_logininfo.useraccount
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	@Column(name = "useraccount")
    @ApiModelProperty(value="登陆账号")
	private String useraccount;

	/**
	 * This field was generated by MyBatis Generator. This field corresponds to
	 * the database column sys_logininfo.username
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
    @ApiModelProperty(value="登陆用户")
	private String username;


	public SysLoginInfo(Long id, String loginip, Date logintime,
			Date logouttime, String sessionid, String useraccount,
			String username) {
		this.id = id;
		this.loginip = loginip;
		this.logintime = logintime;
		this.logouttime = logouttime;
		this.sessionid = sessionid;
		this.useraccount = useraccount;
		this.username = username;
	}

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table sys_logininfo
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public SysLoginInfo() {
		super();
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column sys_logininfo.id
	 * 
	 * @return the value of sys_logininfo.id
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public Long getId() {
		return id;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column sys_logininfo.id
	 * 
	 * @param id
	 *            the value for sys_logininfo.id
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column sys_logininfo.loginIP
	 * 
	 * @return the value of sys_logininfo.loginIP
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public String getLoginip() {
		return loginip;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column sys_logininfo.loginIP
	 * 
	 * @param loginip
	 *            the value for sys_logininfo.loginIP
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public void setLoginip(String loginip) {
		this.loginip = loginip == null ? null : loginip.trim();
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column sys_logininfo.loginTime
	 * 
	 * @return the value of sys_logininfo.loginTime
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getLogintime() {
		return logintime;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column sys_logininfo.loginTime
	 * 
	 * @param logintime
	 *            the value for sys_logininfo.loginTime
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public void setLogintime(Date logintime) {
		this.logintime = logintime;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column sys_logininfo.logoutTime
	 * 
	 * @return the value of sys_logininfo.logoutTime
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getLogouttime() {
		return logouttime;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column sys_logininfo.logoutTime
	 * 
	 * @param logouttime
	 *            the value for sys_logininfo.logoutTime
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public void setLogouttime(Date logouttime) {
		this.logouttime = logouttime;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column sys_logininfo.sessionId
	 * 
	 * @return the value of sys_logininfo.sessionId
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public String getSessionid() {
		return sessionid;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column sys_logininfo.sessionId
	 * 
	 * @param sessionid
	 *            the value for sys_logininfo.sessionId
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public void setSessionid(String sessionid) {
		this.sessionid = sessionid == null ? null : sessionid.trim();
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column sys_logininfo.useraccount
	 * 
	 * @return the value of sys_logininfo.useraccount
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public String getUseraccount() {
		return useraccount;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column sys_logininfo.useraccount
	 * 
	 * @param useraccount
	 *            the value for sys_logininfo.useraccount
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public void setUseraccount(String useraccount) {
		this.useraccount = useraccount == null ? null : useraccount.trim();
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column sys_logininfo.username
	 * 
	 * @return the value of sys_logininfo.username
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column sys_logininfo.username
	 * 
	 * @param username
	 *            the value for sys_logininfo.username
	 * 
	 * @mbggenerated Mon Aug 18 00:48:04 CST 2014
	 */
	public void setUsername(String username) {
		this.username = username == null ? null : username.trim();
	}
}